package com.itheima.dao;

import com.itheima.pojo.CheckGroup;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CheckGroupDao {

    void insert(CheckGroup checkGroup);
    /**
     * 根据id删除检查组
     * @param checkGroupId
     * @return
     */
    @Delete("delete from t_checkgroup where id=#{checkGroupId};")
    void deleteById(Integer checkGroupId);
    /**
     * 根据id查询
     * @param checkGroupId
     * @return
     */
    @Select("select * from t_checkgroup where id=#{checkGroupId}")
    CheckGroup findById(Integer checkGroupId);
    /**
     * 修改检查组
     * @param
     * @return
     */
    void update(CheckGroup checkGroup);

    /**
     * 根据项目编码/项目名称查询检查组
     * @return
     */
    List<CheckGroup> getList(String queryString);

    @Select("select checkgroup_id from t_setmeal_checkgroup where setmeal_id=#{setmealId0};")
    List<Integer> findCheckGroupIdsBySetmealId(Integer setmealId0);
}
